package com.reiuy.service;

import com.reiuy.entity.Cart;
import com.reiuy.entity.Good;
import com.reiuy.entity.Transaction;
import com.reiuy.entity.User;
import com.reiuy.exception.BalanceException;
import com.reiuy.exception.TransactionException;
import com.reiuy.vo.Transactioninfo;

import java.util.List;
import java.util.Map;

public interface TransactionService {
    Map<String, Integer> creattransactionbyshop(User user, Good good,Integer quantity);
    //在shop中直接购买创建交易

    Map<String,Integer> creattransactionbycart(Cart cart);
    //通过购物车创建交易

    Transactioninfo selecttransactioninfoById(Integer transactionid);
    //通过交易id回显Transactioninfo,用于页面展示

    Boolean dopayment(Integer transactionid) throws TransactionException;
    //支付过程

    List<Transactioninfo> getUserpaidtransac(String username);
    //得到用户的已支付订单

        List<Transactioninfo> getUserunpaidtransac(String username);
    //得到用户的未支付订单

}
